require 'picounit/suite/classname'

class Caller
  def self.inspect_stack(offset)
  	ClassName.new(stack_trace_element(offset).class_name)
  end

  def self.direct_caller(caller)
  	ClassName.new(caller.getName)
  end

  private
  def self.stack_trace_element(offset)
  	java.lang.Throwable.new.stack_trace[4 + offset]
  end
end